package com.eastrobot.doc.poitlconvert.mock;

import com.eastrobot.doc.poitlconvert.entity.AcWordModel;
import com.eastrobot.doc.poitlconvert.entity.Article;
import com.eastrobot.doc.poitlconvert.entity.SpecialColumn;
import com.eastrobot.doc.poitlconvert.entity.mytemplateEntity.AbstractMockData;

import java.util.ArrayList;
import java.util.List;

public class ArticleDataMock  {

    public static AcWordModel getFromDB() {
        AcWordModel acWordModel = new AcWordModel();
        Article article1 = new Article();
        Article article2 = new Article();
        Article article3 = new Article();
        Article article4 = new Article();
        Article article5 = new Article();
        article1.setTitle("Spring 中的 Bean");
        article2.setTitle("一分钟学一个 Linux 命令 - ps");
        article3.setTitle("一分钟学一个 Linux 命令 - find 和 grep");
        article4.setTitle("一分钟学一个 Linux 命令 - cat 和 tail");
        article5.setTitle("策 略 模 式「指 鼠 为 鸭」");
        article1.setTags("后端|Java|Spring");
        article2.setTags("后端|Java|Linux");
        article3.setTags("后端|Java|Linux");
        article4.setTags("后端|Java|Linux");
        article5.setTags("后端|Java|设计模式");
        article1.setReading(835);
        article2.setReading(3477);
        article3.setReading(978);
        article4.setReading(900);
        article5.setReading(5217);
        article1.setLikes(2);
        article2.setLikes(27);
        article3.setLikes(13);
        article4.setLikes(13);
        article5.setLikes(43);

        List<Article> articles = new ArrayList<>();
        articles.add(article1);
        articles.add(article2);
        articles.add(article3);
        articles.add(article4);
        articles.add(article5);

        acWordModel.setArticles(articles);

        SpecialColumn specialColumn1 = new SpecialColumn();
        SpecialColumn specialColumn2 = new SpecialColumn();
        specialColumn1.setName("一分钟学一个 Linux 命令");
        specialColumn2.setName("深入浅出 Spring 框架");
        specialColumn1.setSubscription(40);
        specialColumn2.setSubscription(1);
        specialColumn1.setNums(9);
        specialColumn2.setNums(3);

        List<SpecialColumn> specialColumns = new ArrayList<>();
        specialColumns.add(specialColumn1);
        specialColumns.add(specialColumn2);

        acWordModel.setColumns(specialColumns);
        return acWordModel;
    }

}
